package com.example.allplan.SQhelper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.Nullable;

public class YiGeJiHuaSQhelper extends SQLiteOpenHelper {
    final String CHUANG_JIAN_JI_HUA_TIAO_BIAO="create table ji_hua_tiao_biao(id int primary key,chu_shi_zhi int,xian_zai_zhi int,pai_xu_you_biao int,ming_cheng varchar(20))";
    final String CHUANG_JIAN_BEN_JI_HUA_XIN_XI_BIAO="create table xin_xi(id_you_biao int,lei_xing int,tu_pian_ge_shu int,ji_hua_id int,wen_jian_ming varchar(20),biao_ti varchar(20))";
    Context mCON;

    public YiGeJiHuaSQhelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
        mCON=context;
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CHUANG_JIAN_JI_HUA_TIAO_BIAO);
        db.execSQL(CHUANG_JIAN_BEN_JI_HUA_XIN_XI_BIAO);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
